package com.Stream.A01StreamLiu;

import java.util.ArrayList;
import java.util.Collections;

public class A08_Stream {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        Collections.addAll(list, "张三三-15", "李四-16", "王五-17", "赵六-18", "钱七-19");
        list.stream().map(s -> Integer.parseInt(s.split("-")[1])).forEach(s -> System.out.println(s));
    }
}
